import express from 'express'
import cookieSession from 'cookie-session'
import './controller/LoginController'
import './controller/CrowllerController'
import router from './router'

const app = express()

app.use(express.urlencoded({ extended: true }))
app.use(
  cookieSession({
    name: 'session',
    keys: ['student zws'],
    maxAge: 24 * 60 * 60 * 100
  })
)
app.use(router)
app.listen(3000, () => {
  console.log('server is running')
})
